<template>
  <div class="container">
    <h2>我的项目</h2>
    <p>{{ age }}</p>
    <button v-on:click="age++">age+1</button>
    <button @click="age++">age+1</button>

    <hr>
    <button @click="changeAge">让age-1</button>
  </div>
</template>

<script>
export default {
  data () {
    return {
      age: 20
    }
  },
  methods: {
    changeAge () {
      this.age--
    }
  }
}
</script>

<style>
h2 {
  color: red;
}
</style>